#ifndef LIB_TWCORE_PLUGINMANAGER_H
#define LIB_TWCORE_PLUGINMANAGER_H

#include "twcore_global.h"
#include "GlobalInputter.h"
#include <QObject>

class QUrl;
class QFrame;
class QPixmap;
class QTextCursor;
class QPlainTextEdit;
namespace TWCore
{
	class IPlugin;
	class IContext;
	class TwitWarPrivate;
	class MailCreatorDialog;
	class PluginManagerPrivate;

	class TWCORE_EXPORT PluginManager : public QObject
	{
		Q_OBJECT
		Q_DISABLE_COPY(PluginManager)

		public:
			static PluginManager* instance();
			~PluginManager();
			static IPlugin* pluginForName(const QString& name);
			static MailCreatorDialog* getMailCreatorDialog();

			static GlobalInputter* addTweetContext(IContext* c,QString iconPath,const QPixmap* userIcon);
			static void updateTweetIcon(IContext* c,QString iconPath,const QPixmap* userIcon);
			static void removeTweetContext(IContext* c);
		public slots:
			void openUrl(const QString&);
			void openUrl(const QUrl&);
		private:
			PluginManager();
			static PluginManager* m_instance;
			PluginManagerPrivate* m_impl;
		friend class TwitWarPrivate;
	};
}
#endif /* LIB_TWCORE_PLUGINMANAGER_H_ */
